package com.itheima.job;

import java.util.Arrays;

public class Test0101 {
    public static void main(String[] args) {
        int[] arr = {1,432,4,325,24,365,25,89,6,3,476,875,846};
        for (int i = 0; i < arr.length; i++) {
            int min = i;
            for (int j = i+1; j < arr.length; j++) {
                min = arr[min]>arr[j]?j:min;
            }
            int temp = arr[i];
            arr[i] = arr[min];
            arr[min] = temp;

        }
        System.out.println(Arrays.toString(arr));
    }
}
